package com.aldobucchi.x.flash.events.subscriber
{
	
	
	
	/**
	 * 
	 * TODO: add mx.binding support
	 * 
	 * @author aldo.bucchi@gmail.com
	 * 
	 */	
	internal class EventSubscriptionPropertyStep extends AbstractEventSubscriptionStep
	{
		
		
		private var substep:EventSubscriptionStep;
			
		
		private var propertyName:String;
		
		
		
		public function EventSubscriptionPropertyStep( target:Object, propertyName:String, remainingSteps:Array )
		{

			super( target, remainingSteps );
			
			this.propertyName = propertyName;
			
			
			if ( target.hasOwnProperty( propertyName ) )
			{
				substep = new EventSubscriptionStep( target[ propertyName ], remainingSteps );
			}

		}	
		
		

		override internal function kill( ):void
		{
			if ( substep )
			{
				substep.kill( );
			}

		}
			
		
	}
	
}